import React from 'react';
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import Login from './pages/Login';
import MainLayout from './components/layout/MainLayout';
import Home from './pages/Home';
import GlobalInfo from './pages/GlobalInfo';
import Monitoring from './pages/Monitoring';
import PlatformIntegration from './pages/PlatformIntegration';
import System from './pages/System';
import './assets/styles/global.css';

const App: React.FC = () => {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/login" element={<Login />} />
        <Route path="/" element={<MainLayout />}>
          <Route index element={<Navigate to="/home" replace />} />
          <Route path="home" element={<Home />} />
          <Route path="global-info/*" element={<GlobalInfo />} />
          <Route path="monitoring/*" element={<Monitoring />} />
          <Route path="platform-integration/*" element={<PlatformIntegration />} />
          <Route path="system/*" element={<System />} />
        </Route>
      </Routes>
    </BrowserRouter>
  );
};

export default App;
